<?php
/**
 * $Id: ComboBancos.json.php 22 2010-07-16 05:09:41Z corlatti $
 * @author Claudio Corlatti
 *
 */
require '../library/bootstrap/prepend.php';
IncludeHelper::inc('library/dto/response/ComboResponse.class.php');
IncludeHelper::inc('library/session/ComboHelper.class.php');
IncludeHelper::inc ( 'library/session/CuentasCostos.class.php' );

$result = new ComboResponse();
try {
	
	$session = new ComboHelper();
	$bancos = $session->getEnabledBanks();
	$result->result->set(true, 'Ok');
	
	foreach ($bancos as $bank){
		$result->addValue($bank['id'], $bank['descripcion']);
	}
	
} catch (Exception $e){
	
	$result->result->set(false, $e->getMessage());
	
}

echo json_encode($result);
?>